﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Office.DocumentManagement;
using Microsoft.SharePoint;
using MS.InformationManagement.BLL.DocIdGeneration;
using MS.InformationManagement.Support.Constants;

namespace MS.InformationManagement.DocumentIDProviders.Providers
{
    public class StandardDocumentIdProvider : DocumentIdProvider 
    {
        public override bool DoCustomSearchBeforeDefaultSearch
        {
            get { return false; }
        }

        public override string GenerateDocumentId(SPListItem listItem)
        {
            
            return listItem[CustomSiteColumns.FIELD_DOCSET_UNIQUE_ID] == null? DocIdStructureBLL.GetDocumentID(listItem)
                : listItem[CustomSiteColumns.FIELD_DOCSET_UNIQUE_ID].ToString();
        }

        public override string[] GetDocumentUrlsById(SPSite site, string documentId)
        {
            //TODO: Implementar un custom search.
            return new string[] { };
        }

        public override string GetSampleDocumentIdText(SPSite site)
        {
            return "Hola, mi Id unico es [aquí va el número]";
        }
    }
}
